<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var grade = prompt("请输入分数");

    switch (parseInt(grade / 10)) {

      case 10:
        alert("你的成绩等级为优秀");
        break;
      case 9:
        alert("你的成绩等级为优秀");
        break;
      case 8:
        alert("你的成绩等级为良好");
        break;
      case 7:
        alert("你的成绩等级为良好");
        break;
      case 6:
        alert("你的成绩等级为良好");
        break;
      default:
        alert("你的成绩等级为不及格，继续加油哦！");
    }


  </script>
</body>

</html>